package com.hdwe.icpms.admin.domain.bo;

import com.hdwe.icpms.admin.domain.ProtocolMetadata;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 数据协议元数据业务对象 cpc_protocol_metadata
 *
 * @author Lus
 * @date 2024-12-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ProtocolMetadata.class, reverseConvertGenerate = false)
public class ProtocolMetadataBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 说明
     */
    @NotBlank(message = "说明不能为空", groups = { AddGroup.class, EditGroup.class })
    private String metadataComment;

    /**
     * 英文
     */
    @NotBlank(message = "英文不能为空", groups = { AddGroup.class, EditGroup.class })
    private String metadataCommentEn;

    /**
     * 版本
     */
    private String metadataVersion;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String metadataName;

    /**
     * 数据类型
     */
    @NotBlank(message = "数据类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String metadataType;

    /**
     * 长度
     */
    @NotNull(message = "长度不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long metadataLength;

    /**
     * 有无符号
     */
    @NotBlank(message = "有无符号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String metadataSigned;

    /**
     * 精度
     */
    private Long metadataScale;

    /**
     * 多选值
     */
    private String metadataValues;

    /**
     * 默认值
     */
    private String metadataDefault;

    /**
     * 最大值
     */
    private String metadataMax;

    /**
     * 最小值
     */
    private String metadataMin;

    /**
     * 单位
     */
    private String metadataUnit;

    /**
     * 建表语句
     */
    private String metadataDdl;

    /**
     * 字符编码方式
     */
    @NotBlank(message = "字符编码方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String encodingType;

    /**
     * 计算公式
     */
    private String calculation;

    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;


}
